package cn.itcast.domein;

import java.text.SimpleDateFormat;
import java.util.Date;

public class User {

    private String name;
    private int age;
    private String birthday;
    //private Date birthday;

    public User(String name, int age, String birthday) {
        this.name = name;
        this.age = age;
        //this.birthday = birthday;
        this.birthday = birthday;
    }

    public User(){}

//    public String getBirStr(){
//
//        if (birthday != null){
//            //格式化时间日期
//            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//            //返回字符串
//            return sdf.format(birthday);
//        }else{
//            return null;
//        }
//
//    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

//    public Date getBirthday() {
//        return birthday;
//    }

    public String getBirthday() {
        return birthday;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

//    public void setBirthday(Date birthday) {
//        this.birthday = birthday;
//    }

    public void setBirthday2(String birthday) {
        this.birthday = birthday;
    }
}
